1. Technical Field
The present invention relates generally to input/output management in a computer operating system. In particular, the present invention is directed to a method, computer program product, and data processing system for managing operating system buffer caches for input/output devices.
2. Description of the Related Art
In a computer system, input/output (I/O) to/from peripheral devices (especially secondary storage devices such as disks or other media) is typically slower than memory. In particular, magnetic and optical storage devices such as disks or tapes generally require that the read/write head be physically positioned over the portion of the medium to be read/written, which takes time to accomplish. In the case of a rotating disk written in concentric tracks, there is a seek time associated with moving the read/write head to the desired track as well as a latency involved in rotating the disk to the desired portion of the track to be read/written. Moreover, since disks and other storage media are typically designed to read and write blocks of data, rather than individual bytes or characters, a series of reads and writes could require multiple subsequent accesses of the same block or sector. If the block must be positioned under the read/write head each time, this can cause serious performance degradation as the disk must perform the same relatively slow mechanical operations over and over.
One of the most common methods of addressing this performance problem is to use a “buffer cache,” sometimes also referred to as a “block cache.” A buffer cache is a collection of memory buffers that act as temporary storage locations for data moving to or from an I/O device. Application software performing I/O operations read and write data to/from the buffer cache, which is relayed to/from the I/O device by the operating system as needed.
In a typical system, a limited amount of memory space is allocated for the buffer cache. Under heavy I/O loads, this space may fill up quickly, causing processes or threads that need buffer space to hang. Some operating systems, such as AIX (Advanced Interactive executive), a product of International Business Machines Corporation, provide administrative users the ability to manually resize a buffer cache. AIX, for example, provides the “chdev” utility program, which can perform this function. Under very heavy I/O loading, however, even administrator intervention may be ineffective, since a utility program such as “chdev” will generally need its own buffers allocated in the buffer cache to perform its function. This may ultimately lead to a deadlock condition, thus necessitating a reboot of the system.
What is needed, therefore, is method of preventing an exhausted buffer cache from creating a deadlock situation. The present invention provides a solution to this and other problems, and offers other advantages over previous solutions.